require(phyloseq)
require(tidyverse)
require(phyloseq)
require(reshape2)
require(dplyr)
require(ggplot2)
Load data
ps_dmn <- readRDS("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/data/PhyloseqObjects/16S/DMN_ests_16S.Rdata")
sample_data(ps_dmn)$Herbicide <- factor(sample_data(ps_dmn)$Herbicide, levels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
sample_data(ps_dmn)$herb_time<-paste(sample_data(ps_dmn)$Herbicide, sample_data(ps_dmn)$Time, sep = "_")
ps_rare <- readRDS("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/data/PhyloseqObjects/16S/HerbPt1_rare_16S.Rdata")
sample_data(ps_rare)$Herbicide <- factor(sample_data(ps_rare)$Herbicide, levels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
sample_data(ps_rare)$herb_time<-paste(sample_data(ps_rare)$Herbicide, sample_data(ps_rare)$Time, sep = "_")
ps_trans <- readRDS("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/data/PhyloseqObjects/16S/HerbPt1_hel_trans_16S.Rdata")
sample_data(ps_trans)$Herbicide <- factor(sample_data(ps_trans)$Herbicide, levels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
sample_data(ps_trans)$herb_time<-paste(sample_data(ps_trans)$Herbicide, sample_data(ps_trans)$Time, sep = "_")
create alphadiversity tables
alpha_div <- estimate_richness(physeq = ps_rare, measures = c("Observed", "Shannon", "Chao1"))
#pull out metadata and concatonate with alpha diversity metrics
md<-data.frame(sample_data(ps_rare))
alpha_div_md <- rownames_to_column(alpha_div, "Barcode_ID_G") %>% full_join(md)
Joining, by = "Barcode_ID_G"
alpha_div_md$Herbicide <- factor(alpha_div_md$Herbicide, levels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
Shannon Div plots - no significant differences among herbicide treatments at any of the three time points
ggplot(data = alpha_div_md, aes(Herbicide, Shannon, color= Herbicide)) + facet_grid(. ~ Time) + geom_boxplot() + theme_classic() + theme(axis.text.x = element_text(angle = 45, hjust = 1) )
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_Shannon.pdf")
aov_t1<-aov(Shannon ~ Herbicide, data = alpha_div_md[alpha_div_md$Time == "T1",])
plot(aov_t1$residuals)
summary(aov_t1)
aov_t2<-aov(Shannon ~ Herbicide, data = alpha_div_md[alpha_div_md$Time == "T2",])
plot(aov_t2$residuals)
summary(aov_t2)
aov_t3<-aov(Shannon ~ Herbicide, data = alpha_div_md[alpha_div_md$Time == "T3",])
plot(aov_t3$residuals)
summary(aov_t3)
ordinations and adonis testing with three separate objects (i.e., dmn, rarefied, transformed). Rare taxa are removed from rarefied and transfomred to sucessfully ordinate. At this point, the transformed data will not ordinate.
ord_dmn<-ordinate(physeq = ps_dmn, method = "NMDS", distance = "bray", k=3, trymax= 300, maxit=1000)
ps_rare_sub<-prune_taxa(taxa_sums(ps_rare) > 2, ps_rare)
ord_rare<-ordinate(physeq = ps_rare_sub, method = "NMDS", distance = "bray", k=3, trymax= 300, maxit=1000)
ps_trans_sub<-prune_taxa(taxa_sums(ps_trans) > 0.05, ps_trans)
ord_transformed<-ordinate(physeq = ps_trans_sub, method = "NMDS", distance = "bray", trymax= 300, maxit=1000)
Adonis testing of herbicide treatments by time point
ps_adonis<-function(physeq){
otu_tab<-data.frame(phyloseq::otu_table(physeq))
md_tab<-data.frame(phyloseq::sample_data(physeq))
if(taxa_are_rows(physeq)== T){
physeq_dist<-parallelDist::parDist(as.matrix(t(otu_tab)), method = "bray")}
else{physeq_dist<-parallelDist::parDist(as.matrix(otu_tab), method = "bray")}
print(anova(vegan::betadisper(physeq_dist, md_tab$Herbicide)))
vegan::adonis(physeq_dist ~ Herbicide * Time, data = md_tab, permutations = 100)
}
ps_adonis(ps_rare_sub)
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 4 0.002281 0.00057033 0.4454 0.7756
Residuals 160 0.204866 0.00128041
Call:
vegan::adonis(formula = physeq_dist ~ Herbicide * Time, data = md_tab, permutations = 100)
Permutation: free
Number of permutations: 100
Terms added sequentially (first to last)
Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
Herbicide 4 0.7552 0.18880 1.1017 0.02657 0.059406 .
Time 2 0.3792 0.18959 1.1063 0.01334 0.049505 *
Herbicide:Time 8 1.5797 0.19747 1.1523 0.05559 0.009901 **
Residuals 150 25.7059 0.17137 0.90450
Total 164 28.4200 1.00000
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
ps_adonis(ps_trans_sub)
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 4 0.00766 0.0019139 0.279 0.8912
Residuals 165 1.13173 0.0068590
Call:
vegan::adonis(formula = physeq_dist ~ Herbicide * Time, data = md_tab, permutations = 100)
Permutation: free
Number of permutations: 100
Terms added sequentially (first to last)
Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
Herbicide 4 0.3876 0.096908 0.97867 0.02300 0.6436
Time 2 0.2666 0.133309 1.34628 0.01582 0.0198 *
Herbicide:Time 8 0.8525 0.106561 1.07615 0.05058 0.1089
Residuals 155 15.3481 0.099020 0.91061
Total 169 16.8549 1.00000
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
ps_adonis(ps_dmn)
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 4 0.019549 0.0048873 2.8407 0.02596 *
Residuals 165 0.283879 0.0017205
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Call:
vegan::adonis(formula = physeq_dist ~ Herbicide * Time, data = md_tab, permutations = 100)
Permutation: free
Number of permutations: 100
Terms added sequentially (first to last)
Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
Herbicide 4 0.2226 0.055638 2.2900 0.04823 0.009901 **
Time 2 0.1044 0.052199 2.1484 0.02263 0.009901 **
Herbicide:Time 8 0.5214 0.065169 2.6823 0.11299 0.009901 **
Residuals 155 3.7659 0.024296 0.81615
Total 169 4.6142 1.00000
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Ordination plots DMN
ord_t1_dmn<-ordinate(physeq = subset_samples(ps_dmn, Time=="T1"), method = "NMDS", distance = "bray", k=3, trymax= 100)
T1_dmn<-ggordiplots::gg_ordiplot(ord = ord_t1_dmn, groups = data.frame(sample_data(subset_samples(ps_dmn, Time == "T1")))$Herbicide, choices = c(1, 2), kind = c("se"), conf = 0.95, show.groups = "all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, plot = TRUE, pt.size = 1)
T1_dmn$plot + theme_classic()
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_ordination_dmn_T1.pdf")
ord_t2_dmn<-ordinate(physeq = subset_samples(ps_dmn, Time=="T2"), method = "NMDS", distance = "bray", k=3, trymax= 100)
T2_dmn<-ggordiplots::gg_ordiplot(ord = ord_t2_dmn, groups = data.frame(sample_data(subset_samples(ps_dmn, Time == "T2")))$Herbicide, choices = c(1, 2), kind = c("se"), conf = 0.95, show.groups = "all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, plot = TRUE, pt.size = 1)
T2_dmn$plot + theme_classic()
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_ordination_dmn_T2.pdf")
ord_t3_dmn<-ordinate(physeq = subset_samples(ps_dmn, Time=="T3"), method = "NMDS", distance = "bray", k=3, trymax= 100)
T3_dmn<-ggordiplots::gg_ordiplot(ord = ord_t3_dmn, groups = data.frame(sample_data(subset_samples(ps_dmn, Time == "T3")))$Herbicide, choices = c(1, 2), kind = c("se"), conf = 0.95, show.groups = "all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, plot = TRUE, pt.size = 1)
T3_dmn$plot + theme_classic()
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_ordination_dmn_T3.pdf")
Ordination plots rarefied
ord_t1_rare<-ordinate(physeq = subset_samples(ps_rare, Time=="T1"), method = "NMDS", distance = "bray", k=3, trymax= 100)
T1_rare<-ggordiplots::gg_ordiplot(ord = ord_t1_rare, groups = data.frame(sample_data(subset_samples(ps_rare, Time == "T1")))$Herbicide, choices = c(1, 2), kind = c("se"), conf = 0.95, show.groups = "all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, plot = TRUE, pt.size = 1)
T1_rare$plot + theme_classic()
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_ordination_rare_T1.pdf")
ord_t2_rare<-ordinate(physeq = subset_samples(ps_rare, Time=="T2"), method = "NMDS", distance = "bray", k=3, trymax= 100)
T2_rare<-ggordiplots::gg_ordiplot(ord = ord_t2_rare, groups = data.frame(sample_data(subset_samples(ps_rare, Time == "T2")))$Herbicide, choices = c(1, 2), kind = c("se"), conf = 0.95, show.groups = "all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, plot = TRUE, pt.size = 1)
T2_rare$plot + theme_classic()
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_ordination_rare_T2.pdf")
ord_t3_rare<-ordinate(physeq = subset_samples(ps_rare, Time=="T3"), method = "NMDS", distance = "bray", k=3, trymax= 100)
T3_rare<-ggordiplots::gg_ordiplot(ord = ord_t3_rare, groups = data.frame(sample_data(subset_samples(ps_rare, Time == "T3")))$Herbicide, choices = c(1, 2), kind = c("se"), conf = 0.95, show.groups = "all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, plot = TRUE, pt.size = 1)
T3_rare$plot + theme_classic()
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_ordination_rare_T3.pdf")
box and whisker plots of distance within group distances
library(micrUBIfuns)
beta_boxplot(physeq = subset_samples(ps_rare, Time=="T1"), method = "bray", group = "Herbicide")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_T1_rare_withingroup_beta.pdf")
beta_boxplot(physeq = subset_samples(ps_rare, Time=="T2"), method = "bray", group = "Herbicide")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_T2_rare_withingroup_beta.pdf")
beta_boxplot(physeq = subset_samples(ps_rare, Time=="T3"), method = "bray", group = "Herbicide")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_T3_rare_withingroup_beta.pdf")
treatment to control
plotDistances = function(p, m, s, d) {
# calc distances
wu = phyloseq::distance(p, m)
wu.m = melt(as.matrix(wu))
# remove self-comparisons
wu.m = wu.m %>%
filter(as.character(Var1) != as.character(Var2)) %>%
mutate_if(is.factor,as.character)
# get sample data (S4 error OK and expected)
sd = data.frame(sample_data(p)) %>%
select(s, d) %>%
mutate_if(is.factor,as.character)
sd$Herbicide <- factor(sd$Herbicide, levels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
# combined distances with sample data
colnames(sd) = c("Var1", "Type1")
wu.sd = left_join(wu.m, sd, by = "Var1")
colnames(sd) = c("Var2", "Type2")
wu.sd = left_join(wu.sd, sd, by = "Var2")
#remove this line to plot all comparisons.
wu.sd = wu.sd %>% filter(Type1 == "Hand" | Type1 == "Non-Treated")
# plot
ggplot(wu.sd, aes(x = Type2, y = value)) +
theme_bw() +
geom_point() +
geom_boxplot(aes(color = ifelse(Type1 == Type2, "red", "black"))) +
scale_color_identity() +
facet_wrap(~ Type1, scales = "free_x") +
theme(axis.text.x=element_text(angle = 45, hjust = 1, size = 5)) +
ggtitle(paste0("Distance Metric = ", m))
}
a<-plotDistances(p = subset_samples(physeq= ps_rare, Time=="T1"), m = "bray", s = "Barcode_ID_G", d = "Herbicide")
a <- a + ggtitle("Time 1 Bray-Curtis Dissimlarities")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_T1_rare_allgroup_beta.pdf")
b<-plotDistances(p = subset_samples(physeq= ps_rare, Time=="T2"), m = "bray", s = "Barcode_ID_G", d = "Herbicide")
b <-b + ggtitle("Time 2 Bray-Curtis Dissimlarities")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_T2_rare_allgroup_beta.pdf")
c<-plotDistances(p = subset_samples(physeq= ps_rare, Time=="T3"), m = "bray", s = "Barcode_ID_G", d = "Herbicide")
c<- c + ggtitle("Time 3 Bray-Curtis Dissimlarities")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_T3_rare_allgroup_beta.pdf")
library(ggpubr)
ggarrange(a, b, c, ncol = 1)
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_combined_rare_allgroup_beta.pdf", width = 7, height = 10)
Taxon abundance bar plot
#create super long color vector
col_vector <- c("#000000", "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059",
"#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87",
"#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100",
"#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F",
"#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09",
"#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81",
"#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00",
"#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329",
"#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C",
"#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800",
"#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58",
"#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D",
"#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176",
"#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4",
"#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01",
"#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966",
"#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C",
"#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868",
"#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183",
"#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433",
"#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F",
"#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F",
"#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66",
"#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25",
"#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B")
phylumGlommed <- tax_glom(ps_rare, "Phylum")
#t1
phylumGlommed_herb_t1 <- merge_samples(subset_samples(physeq= phylumGlommed, Time=="T1"), group = "Herbicide")
phylumGlommed_herb_t1 <- transform_sample_counts(phylumGlommed_herb_t1, function(OTU) OTU/sum(OTU))
sample_data(phylumGlommed_herb_t1)$Herbicide <- factor(sample_data(phylumGlommed_herb_t1)$Herbicide, levels = c(1, 2, 3, 4, 5),
labels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
plot_bar(phylumGlommed_herb_t1, x = "Herbicide", fill = "Phylum") + theme_classic() + ggtitle("Proportional Taxon Abundances Time 1") +
theme(legend.position="bottom") + guides(fill=guide_legend(nrow=6)) + geom_bar(stat="identity") + theme(axis.text.x=element_text(angle = 45, hjust = 1, size = 5)) +
scale_fill_manual(values = col_vector)
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_Taxon_barplot_t1.pdf")
#t2
phylumGlommed_herb_t2 <- merge_samples(subset_samples(physeq= phylumGlommed, Time=="T2"), group = "Herbicide")
phylumGlommed_herb_t2 <- transform_sample_counts(phylumGlommed_herb_t2, function(OTU) OTU/sum(OTU))
sample_data(phylumGlommed_herb_t2)$Herbicide <- factor(sample_data(phylumGlommed_herb_t2)$Herbicide, levels = c(1, 2, 3, 4, 5),
labels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
plot_bar(phylumGlommed_herb_t2, x = "Herbicide", fill = "Phylum") + theme_classic() + ggtitle("Proportional Taxon Abundances Time 1") +
theme(legend.position="bottom") + guides(fill=guide_legend(nrow=6)) + geom_bar(stat="identity") + theme(axis.text.x=element_text(angle = 45, hjust = 1, size = 5)) +
scale_fill_manual(values = col_vector)
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_Pt1/Figures/16S_Taxon_barplot_t2.pdf")
#t3
phylumGlommed_herb_t3 <- merge_samples(subset_samples(physeq= phylumGlommed, Time=="T3"), group = "Herbicide")
phylumGlommed_herb_t3 <- transform_sample_counts(phylumGlommed_herb_t3, function(OTU) OTU/sum(OTU))
sample_data(phylumGlommed_herb_t3)$Herbicide <- factor(sample_data(phylumGlommed_herb_t3)$Herbicide, levels = c(1, 2, 3, 4, 5),
labels = c("Non-Treated", "Hand", "Aatrex", "Clarity", "Roundup Powermax"))
plot_bar(phylumGlommed_herb_t3, x = "Herbicide", fill = "Phylum") + theme_classic() + ggtitle("Proportional Taxon Abundances Time 1") +
theme(legend.position="bottom") + guides(fill=guide_legend(nrow=6)) + geom_bar(stat="identity") + theme(axis.text.x=element_text(angle = 45, hjust = 1, size = 5)) +
scale_fill_manual(values = col_vector)
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_Pt1/Figures/16S_Taxon_barplot_t3.pdf")
Combined herbicide and time bar plot for exploration
sample_data(ps_rare)$herb_time<-paste(sample_data(ps_rare)$Herbicide, sample_data(ps_rare)$Time, sep = "_")
ps_rare_for_barplot <- prune_taxa(taxa_sums(ps_rare) > 50, ps_rare)
plot_bar(ps_rare_for_barplot, x= "herb_time", fill = "Family") + scale_fill_manual(values = col_vector) + geom_bar(stat="identity")
ggsave("/Users/gordoncuster/Desktop/Git_Projects/Herbicide_Microbes_PT1/Figures/16S_BarPlot_Herbicide_Time.pdf", width = 20, height = 11)
Linear modeling of abundant taxa
<<<<<<< HEAD
Tax_glom_Subset <- function (physeq, y = "taxLevel", nreturns = "Number of returns"){
ps_1<- tax_glom(ps_rare_sub, taxrank = y )
myTaxa <- names(sort(taxa_sums(ps_1), decreasing = TRUE)[1:nreturns])
ps_1_sub <- prune_taxa(myTaxa, ps_1)
return(ps_1_sub)
}
ps_rare_family_top25<-Tax_glom_Subset(physeq = ps_rare, nreturns = 25, y = "Family")
#explore top 25 taxa with plot bar
plot_bar(ps_rare_family_top25, x= "herb_time", fill = "Family") + scale_fill_manual(values = col_vector) + geom_bar(stat="identity")
#write function to wrangle data prior to anova
abund_aov_wrangle <- function (physeq, y = "Tax_Level"){
tax<-tax_table(physeq)[,y]
meta<-data.frame(sample_data(physeq))
counts<-data.frame(otu_table(physeq))
rownames(counts) <- tax[,1]
counts<-data.frame(t(counts))
counts$Time <- meta$Time
counts$Herbicide <- meta$Herbicide
counts$Herb_time <- meta$herb_time
return(counts)
}
test<-abund_aov_wrangle(ps_rare_family_top25, y = "Family")
mod_abund<-function(count_tab, DV = "Independent Variable") {
for (i in 3:ncol(count_tab)-2) {
for(j in 1:length(unique(count_tab[,"Herbicide"]))){
data <- count_tab %>% filter(Herbicide == unique(count_tab$Herbicide[j]))
mod <- aov(unlist(data[1]) ~ matrix(data[,DV]))
if(summary(mod)[[1]][["Pr(>F)"]][1] <= 0.05) {
data <- count_tab %>% filter(Herbicide == unique(count_tab$Herbicide[j]))
#return(boxplot(unlist(data[1]) ~ matrix(data[,DV]), main = paste(names(data[1])), xlab= "Time", ylab="Abundance")
# )
print(boxplot(unlist(data[1]) ~ matrix(data[,DV]), main =paste(names(data[i]), as.character(unique(count_tab[,"Herbicide"]))[j]), xlab= "Time", ylab="Abundance") )
}
}
}
}
mod_abund(count_tab = test, DV = "Time")
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
$stats
[,1] [,2] [,3]
[1,] 22.0 23 38.0
[2,] 26.0 33 40.0
[3,] 32.0 38 47.0
[4,] 44.5 46 67.5
[5,] 61.0 60 73.0
$n
[1] 12 11 11
$conf
[,1] [,2] [,3]
[1,] 23.56203 31.80696 33.89933
[2,] 40.43797 44.19304 60.10067
$out
f.Micrococcaceae33
141
$group
[1] 3
$names
[1] "T1" "T2" "T3"
mod_abund(counts = test, DV = "Time", Grouping = "Herbicide" )
Error in `[.data.frame`(counts, counts[, Grouping[i]] == as.character(unique(counts[, :
object 'j' not found
>>>>>>> ffc19d2ebb63579760114dd25310f43274e1e231